package com.maimao.api.auth;

import com.maimao.core.model.auth.LoginCodeRequest;
import com.maimao.core.model.resp.Result;
import com.maimao.core.model.auth.SysLoginRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2020/11/29 10:05 下午
 */
@Api(value = "认证接口", tags = {"用户认证"})
public interface AuthApi {

    @ApiOperation("用户名/手机+密码方式登录 ")
    Result<Object> upLogin(SysLoginRequest sysLoginRequest, String type);

    @ApiOperation("用户名/手机/邮箱 + 密码 + 图形验证码登录 会员三个都允许 企业只允许邮箱登录")
    public Result<Object> webAuth(LoginCodeRequest loginCodeRequest, String type);

    @ApiOperation("手机号+验证码登录 ")
    Result<Object> mobileAuth(LoginCodeRequest loginCodeRequest, String type);

    @ApiOperation("后台退出")
    Result sysLogout();

    @ApiOperation("web退出")
    Result webLogout();

    @ApiOperation("根据cookie获取jwt")
    public Result<String> getJwt( Map<String, String> data);
}
